package com.corx.network.mysqlstorage.repository;

import com.corx.network.mysqlstorage.common.PageQuery;
import com.corx.network.mysqlstorage.common.PageResult;
import com.corx.network.mysqlstorage.model.Network;

import java.util.List;
import java.util.Optional;

/**
 * 网络组件Repository
 *
 * @author gx
 * @version 1.0.0
 */
public interface NetworkRepository {

    Optional<Network> findById(Long id);

    List<Network> findByType(String type);

    PageResult<Network> findByPage(Network model, PageQuery pageQuery);

    void save(Network model);

    void update(Network model);

    void updateBatch(List<Network> models);

    void delete(Long id);

    List<Network> findAll();


}
